//
//  JSMDiscoverDetailsShowTableviewCell.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/12/5.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMDiscoverDetailsShowTableviewCell.h"

@implementation JSMDiscoverDetailsShowTableviewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.onceLabel = [[BaseLabel alloc] init];
    [self.contentView addSubview:self.onceLabel];
    
    self.onceLabel.numberOfLines = 0;
    [self.onceLabel sizeToFit];
    self.onceLabel.font = [UIFont systemFontOfSize:15];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:15], NSFontAttributeName, nil];
    CGRect wordRect = [self.onceLabel.text boundingRectWithSize:CGSizeMake(TableViewCellWidth - 30, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    self.onceLabel.frame = CGRectMake(15, 0, TableViewCellWidth - 30, wordRect.size.height);
    
    
}

@end
